home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form pgpc
- BorderStyle = 3 'Fixed Double
- Caption = "PGP Composer ver 1.1"
- ClientHeight = 6840
- ClientLeft = -90
- ClientTop = 450
- ClientWidth = 9435
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Futura Md BT"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 7245
- Icon = PGPC.FRX:0000
- Left = -150
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 6840
- ScaleWidth = 9435
- Top = 105
- Width = 9555
- Begin TextBox signas
- Enabled = 0 'False
- Height = 375
- Left = 6600
- TabIndex = 9
- Top = 6240
- Width = 2655
- End
- Begin CommandButton Command1
- Caption = "&Go"
- Height = 375
- Left = 7920
- TabIndex = 2
- Top = 5760
- Width = 1335
- End
- Begin PictureBox Picture1
- BorderStyle = 0 'None
- Height = 495
- Left = 7200
- Picture = PGPC.FRX:0302
- ScaleHeight = 495
- ScaleWidth = 615
- TabIndex = 10
- Top = 5760
- Width = 615
- End
- Begin CheckBox issign
- Caption = "&Sign [as]"
- Height = 255
- Left = 6600
- TabIndex = 3
- Top = 5640
- Width = 1215
- End
- Begin CommandButton rereadkeys
- Caption = "ReRead &Keys"
- Height = 375
- Left = 7920
- TabIndex = 8
- Top = 5280
- Width = 1335
- End
- Begin CheckBox ismore
- Caption = "&Eyes Only"
- Height = 255
- Left = 6600
- TabIndex = 4
- Top = 5280
- Width = 1215
- End
- Begin Timer Timer1
- Interval = 1000
- Left = 9600
- Top = 1800
- End
- Begin ListBox hexlist
- Height = 3150
- Left = 9240
- TabIndex = 6
- Top = 960
- Visible = 0 'False
- Width = 1815
- End
- Begin ListBox textlist
- Height = 4515
- Left = 6600
- TabIndex = 5
- Top = 600
- Width = 2775
- End
- Begin TextBox pad
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 6015
- Left = 120
- MultiLine = -1 'True
- TabIndex = 1
- Top = 600
- Width = 6375
- End
- Begin TextBox recepients
- Height = 375
- Left = 960
- TabIndex = 0
- Top = 120
- Width = 8415
- End
- Begin Label Label1
- Caption = "To:"
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 120
- Width = 615
- End
- Dim stage As Integer
- Sub Command1_Click ()
- Open "plaintmp.$$$" For Output As #1
- Print #1, pad.text
- Close (1)
- On Local Error Resume Next
- Kill "enc$tmp.$$$"
- flags$ = "wa"
- rec$ = LTrim$(RTrim$(recepients.text))
- If issign.value Then
- flags$ = flags$ + "s"
- signuser$ = LTrim$(RTrim$(signas.text))
- End If
- If ismore.value Then flags$ = flags$ + "m"
- If rec$ <> "" Then flags$ = flags$ + "e"
- If issign.value And signuser$ <> "" Then
- flags$ = flags$ + " -u """ + signuser$ + """"
- End If
- pgpc.caption = "Launching PGP..."
- screen.pointer = 11
- i% = Shell("pgpcomp.pif " + flags$ + " " + rec$, 1)
- stage = 4
- End Sub
- Sub Form_Load ()
- screen.mousepointer = 11
- stage = 3 ' first, we assume have pgpk$tmp.$$$
- End Sub
- Sub getkeys ()
- Do While textlist.listcount
- textlist.RemoveItem 0
- hexlist.RemoveItem 0
- Loop
- If stage = 3 Then
- stage = 0
- On Local Error GoTo nokey3
- Open "pgpk$tmp.$$$" For Input As #1
- While Not EOF(1)
- Input #1, l$
- If Left$(l$, 4) = "pub " Then
- textlist.AddItem (Mid$(l$, 30))
- hexlist.AddItem (Mid$(l$, 11, 6))
- End If
- Wend
- Close (1)
- pgpc.caption = "PGP Composer ver 1.1" ' restore just in case.
- screen.mousepointer = 0
- End If
- GoTo fin3
- nokey3:
- stage = 1
- Resume fin3
- fin3:
- End Sub
- Sub issign_Click ()
- signas.enabled = issign.value
- End Sub
- Sub launchkeys ()
- If stage = 1 Then
- stage = 0
- pgpc.caption = "Scanning Keyring..."
- i% = Shell("pgpkeys.pif -kv", 2)
- stage = 2
- End If
- End Sub
- Sub rereadkeys_Click ()
- On Local Error Resume Next
- Kill "pgpk$tmp.$$$"
- stage = 1
- End Sub
- Sub textlist_DblClick ()
- recepients.text = LTrim$(RTrim$(recepients.text)) + " 0x" + hexlist.list(textlist.listindex)
- pad.SetFocus
- End Sub
- Sub Timer1_Timer ()
- Select Case stage
- Case 1
- launchkeys
- Case 2
- waitforkeys
- Case 3
- getkeys
- Case 4
- stage = 5 ' buy some time
- Case 5
- waitforenc
- End Select
- End Sub
- Sub waitforenc ()
- If stage = 5 Then
- stage = 0
- On Local Error GoTo notyet5
- Open "enc$tmp.$$$" For Input As #1
- Close (1)
- i% = Shell("notepad enc$tmp.$$$", 1)
- End
- End If
- notyet5:
- stage = 5
- Resume fin5
- fin5:
- End Sub
- Sub waitforkeys ()
- If stage = 2 Then
- stage = 0
- On Local Error GoTo notyet2
- Open "pgpk$tmp.$$$" For Input As #1
- stage = 3
- Close (1)
- GoTo fin2
- notyet2:
- stage = 2
- Resume fin2
- fin2:
- End If
- End Sub
-